
const theme = {
	namespaced: true,
	state: {
		theme: "default-theme",
	},
	mutations: {
		// 设置主题色
		GET_THEME(state, provider) {
			state.theme = provider
		},
		// 设置主题缓存
		SET_THEME_CACHE(state, provider) {
			uni.setStorage({
				key: "themeType",
				data: provider
			});
		},
	},
	getters: {
		theme: state => state.theme,
	},
}

export default theme
